package com.zzzzzz.topic.service;

import java.util.List;

import com.zzzzzz.core.exception.NoSuchCommentException;
import com.zzzzzz.topic.model.Comment;

public interface CommentService {
	
	void add(Comment comment);
	
	Comment add(String userId, String topicId, String parentId, String content);
	
	void delete(String commentId);
	
	Comment findById(String commentId) throws NoSuchCommentException;
	
	long findCountByParentId(String parentId);

	List<Comment> findByParentId(String parentId);
	
	List<Comment> findByParentId(String parentId, int start, int offset, boolean ascending);
	
	long findCountByTopicId(String topicId);
	
	List<Comment> findByTopicId(String topicId);
	
	List<Comment> findByTopicId(String topicId, int start, int offset, boolean ascending);
	
	void editStatus(String commentId, Integer status);

}
